//
//  ArticleCell.m
//  news_ios_app
//
//  Created by 陈铖 on 16/3/24.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "ArticleCell.h"
#import "ArticleModel.h"
#import <YYLabel.h>
@interface ArticleCell ()
@property (strong,nonatomic) YYLabel *titleLab;
@property (strong,nonatomic) UIImageView *newsImageView;
@property (strong,nonatomic) YYLabel *createTimeLab;
@property (strong,nonatomic) YYLabel *fromLab;
@end

@implementation ArticleCell
-(void)initialize
{
    _titleLab = [[YYLabel alloc]init];
    _titleLab.text = 
}
- (instancetype)init
{
    if (self == [super init]) {
        //        [self setDelegate:self];
    }
    return self;
}

- (void)updateCellWithModel:(id)model
{
    if (![model isKindOfClass:[ArticleModel class]]) {
        return;
    }
    ArticleModel *cellModel = (ArticleModel *)model;
    [self.textLabel setText:cellModel.subTitle];
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:cellModel.thumbnail_url]];
}

- (CGFloat)heightWithModel:(id)model
{
    if (![model isKindOfClass:[ArticleModel class]]) {
        return 0;
    }
    return 50.0f;
}
@end
